 
package com.zdkj.subway.stm.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zdkj.subway.stm.dto.out.SwStCycleTicketChangeDTO;
import com.zdkj.subway.stm.entity.SwStCycle;
import com.zdkj.subway.stm.mapper.SwStCycleMapper;
import com.zdkj.subway.stm.service.SwStCycleService;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;

import java.time.LocalDate;
import java.util.List;

/**
 * 站间调票
 *
 * @author 陈博
 * @date 2020-01-14 14:39:01
 */
@Service
@AllArgsConstructor
public class SwStCycleServiceImpl extends ServiceImpl<SwStCycleMapper, SwStCycle> implements SwStCycleService {
    private final SwStCycleMapper swStCycleMapper;


    @Override
    public Page<SwStCycle> pageMapper(Page page, QueryWrapper<SwStCycle> allEq) {
        return swStCycleMapper.pageMapper(page,allEq);
    }

    @Override
    public SwStCycleTicketChangeDTO getTicketChange(LocalDate localDate,String station) {
        LocalDate after = localDate.plusDays(1);
        return swStCycleMapper.getTicketChange(localDate,after,station);
    }

    @Override
    public List<SwStCycle> getOverTime() {
        return swStCycleMapper.getOverTime();
    }
}
